home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / Duck Report / _SETUP.1 / FYear.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-09-19  |  822 b   |  51 lines

  1. unit FYear;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, ExtCtrls;
  8.  
  9. type
  10.   TFormYear = class(TForm)
  11.     RGYear: TRadioGroup;
  12.     BOK: TButton;
  13.     BCancel: TButton;
  14.     procedure BOKClick(Sender: TObject);
  15.     procedure BCancelClick(Sender: TObject);
  16.   private
  17.   public
  18.         iYear:        Integer;
  19.   end;
  20.  
  21. var
  22.   FormYear: TFormYear;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28.  
  29. procedure TFormYear.BOKClick(Sender: TObject);
  30. begin
  31.     Case RGYear.ItemIndex of
  32.         0:    iYear    := 1988;
  33.         1:    iYear    := 1989;
  34.         2:    iYear    := 1992;
  35.         3:    iYear    := 1993;
  36.         4:    iYear    := 1994;
  37.         5:    iYear    := 1995;
  38.     End;
  39.   Close;
  40.     ModalResult    := mrOK;
  41. end;
  42.  
  43. procedure TFormYear.BCancelClick(Sender: TObject);
  44. begin
  45.     iYear    := 0;
  46.   Close;
  47.     ModalResult    := mrCancel;
  48. end;
  49.  
  50. end.
  51.